CXX = gcc
CXXFLAGS=-I/usr/local/include/boost -I../Common -I/usr/include/mysql-connector -c -g -fPIC
ALLOBJECTS = stdafx.o DataServer.o Peer.o PeerManager.o Char.o CharManager.o ServerCallbackData.o ModulePlayer.o

DataServer : $(ALLOBJECTS)
	$(CXX) -L/usr/local/lib/ -L/usr/local/mysql/lib/mysql -L/usr/lib/ -L../Common -lCommon -lmysqlclient  -lboost_thread  -lmysqlcppconn -lboost_system -lstdc++ -lpthread -g -o DataServer $(ALLOBJECTS)  

stdafx.o : stdafx.cpp
	$(CXX) $(CXXFLAGS) stdafx.cpp
DataServer.o : DataServer.cpp
	$(CXX) $(CXXFLAGS) DataServer.cpp
Peer.o : Peer.cpp
	$(CXX) $(CXXFLAGS) Peer.cpp
PeerManager.o : PeerManager.cpp
	$(CXX) $(CXXFLAGS) PeerManager.cpp
Char.o : Char.cpp
	$(CXX) $(CXXFLAGS) Char.cpp
CharManager.o : CharManager.cpp
	$(CXX) $(CXXFLAGS) CharManager.cpp
ServerCallbackData.o : ServerCallbackData.cpp
	$(CXX) $(CXXFLAGS) ServerCallbackData.cpp
ModulePlayer.o : ModulePlayer.cpp
	$(CXX) $(CXXFLAGS) ModulePlayer.cpp
.PHONY :  clean
clean :
	-rm *.o
	-rm DataServer
.PHONY : install
install :
